package com.hdax.easybuy.controller;

import com.hdax.easybuy.api.NewsServiceClient;
import com.hdax.easybuy.entity.News;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController

public class NewsManager {
    @Resource
    private NewsServiceClient newsServiceClient;

    @RequestMapping("/newsManager/getAllNews")
    public List<News> getAllNews(){
        return newsServiceClient.getAllNews();
    }
}
